Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <head> <style> table, th, td { border: 1px solid black; } </style> </head> <body> <p>Click the button to change the value of the abbr attribute of th with id "myTh".</p> <table> <tr> <th id="myTh" abbr="Make">Toy manufacturer</th> <th abbr="Model">Vehicle model</th> </tr> <tr> <td>Bruder Toys</td> <td>Cross Country Vehicle</td> </tr> </table> <br> <button onclick="myFunction()">Try it</button> <p id="demo"></p> <script> function myFunction() { var x = document.getElementById("myTh").abbr = "Company"; document.getElementById("demo").innerHTML = "The value of the abbr attribute was changed from 'Make' to 'Company'."; } </script> </body> <!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_th_abbr2 by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 08:35:11 GMT --> </html>
Result:
Try it Yourself - © w3schools.com